package com.ustadzmenjawab.client;

import java.util.List;
import java.util.TreeMap;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.ustadzmenjawab.shared.Article;
import com.ustadzmenjawab.shared.SearchResult;
import com.ustadzmenjawab.shared.WebsiteSource;

public interface AppControlServiceAsync {
	void addNewArticle(Article article, AsyncCallback callback);
	void searchKeyword(String keyword, AsyncCallback<List<SearchResult>> callback);
	void searchKeyword(String keyword, String source, int start, int size,
			AsyncCallback<List<SearchResult>> callback);
	void searchKeyword(String keyword, int start, int size,
			AsyncCallback<List<SearchResult>> callback);
	void searchKeyword(String keyword, String source,
			AsyncCallback<List<SearchResult>> callback);
	void getSourcesForResult(String keyword,
			AsyncCallback<List<String>> callback);
	void getTotalCount(String keyword, AsyncCallback<Integer> callback);
	void getTotalCountForSource(String keyword, String source,
			AsyncCallback<Integer> callback);
	void updateVisit(String url, AsyncCallback<Void> callback);
	void getQuestion(int id, AsyncCallback<String> callback);
	void searchSimilarQuestion(String keyword, int qid, int start, int size,
			AsyncCallback<List<SearchResult>> callback);
	void searchSimilarQuestion(String keyword, int qid,
			AsyncCallback<List<SearchResult>> callback);
	void getCountSimilarResult(int qid, AsyncCallback<Integer> callback);
	void getPage(String pageName, AsyncCallback<String> callback);
	void getSourceList(AsyncCallback<List<WebsiteSource>> callback);
	void getSpellSuggestion(String query, AsyncCallback<String> callback);
}
